Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development


Disabling data links to dependent SDOs

Another situation that often arises with multi-page windows is that you have a series of SDOs (parent-child-grandchild) on a sequence of pages. When the user views Page 1 and the parent data, by default the Data links between the SDOs send the dataAvailable event on to the next SDO, causing it to open its query using the ForeignFields keys for the currently selected record in the master. You might or might not want this to happen. There is obviously an overhead associated with it, and as the user selects one record or another on the page for the master SDO, it might be useless to retrieve dependent data on another page until it is actually viewed.

You can control this behavior by using the SDO’s ToggleDataTargets attribute. The attribute is TRUE by default, so that behavior is optimized by effectively making the link inactive. What actually happens is that the code unsubscribes the Data-Target to the events that activate the Target to open its query, including dataAvailable. The link itself is still there and can be used for other purposes.

To force dependent SDOs to retrieve dependent data immediately, set the ToggleDataTargets attribute to False for the master SDO (and any other SDOs that have dependent SDOs under them) in the Container Builder property sheet. You can also set this value in the Dynamic property sheet, or you can bring up the object properties for the SDO and unselect Activate/deactivate Data Triggers on view/hide.

Note: The ToggleData SmartLink used in earlier versions of the framework for much the same purpose as the ToggleDataTargets property is no longer actively supported. Use the ToggleDataTargets property instead.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095